# Maintainer: Sergej Pupykin <sergej@aur.archlinux.org>
# Contributor: Sideris Michael <msid@daemons.gr>

pkgname=nanoblogger
pkgver=3.4.2
pkgrel=2
pkgdesc="NanoBlogger is a small weblog engine written in Bash for the command line"
arch=('any')
url="http://nanoblogger.sourceforge.net/"
license=("GPL")
depends=(bash)
backup=(etc/nb.conf)
source=(http://nanoblogger.sourceforge.net/downloads/$pkgname-$pkgver.tar.gz
	nb)
md5sums=('9de66534776d557c4611cabbdedcaaff'
         '41882e512508ab0e043dcf0187424add')

build() {
  cd $srcdir/$pkgname-$pkgver

  install -d $pkgdir/usr/{bin,share/$pkgname}
  install -d $pkgdir/etc

  cp -Rp * $pkgdir/usr/share/$pkgname

  mv $pkgdir/usr/share/$pkgname/nb.conf $pkgdir/etc/
  ln -s /etc/nb.conf $pkgdir/usr/share/$pkgname/nb.conf
  install $srcdir/nb $pkgdir/usr/bin
}
